<template>
  <div>
    <!-- 导航栏 start -->
    <van-nav-bar title="一句话招聘" left-arrow fixed  @click-left="$router.back()"/>
    <!-- 导航栏 end -->

    <div class="content-top">
      <!-- 一句话招聘 -->
      <ul class="esay">
        <li v-for="(item,index) in list" :key="index">
          <p class="job">
            <span>{{item.stationName}}</span>
            <span>{{item.salaryFormat}}</span>
            <span>{{item.stationContent}}</span>
          </p>
          <p class="contact">
            <span @click="toCall(item.linktel)">{{item.linkman}}({{item.linktel}})</span>
            <span>{{item.insertTime}}</span>
          </p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { NavBar } from "vant";
import { returnToPhoneWithData } from '@/util/phone';
export default {
  name: "Esay",
  components: {
    [NavBar.name]: NavBar,
  },
  // 定义属性
  data() {
    return {
      list: []
    };
  },
  mounted() {
    this.getList();
  },
  // 方法集合
  methods: {
    getList() {
      this.$api.get('/Wap/GetOneWordList').then((res) => { this.list = res.response; });
    },
		toCall(phone){
			returnToPhoneWithData({action:'call',tel:phone})
		}
  },
};
</script>
  
<style scoped>
.esay {
  display: flex;
  flex-direction: column;
}

.esay li {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  margin-bottom: 10px;
  background-color: #fff;
}

.esay .job {
  display: flex;
  flex-direction: column;
  padding: 15px 0;
  line-height: 22px;
}

.esay .job span + span {
  margin-top: 7px;
}

.esay .job span:nth-child(1) {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

.esay .job span:nth-child(2) {
  font-size: 16px;
  color: #f00;
}

.esay .job span:nth-child(3) {
  font-size: 14px;
  color: #666;
}

.esay .contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-top: 0.5px solid #eee;
  line-height: 1;
}

.esay .contact span:nth-child(1) {
  font-size: 14px;
  color: #333;
}

.esay .contact span:nth-child(1)::before {
  content: "联系：";
  color: #999;
}

.esay .contact span:nth-child(2) {
  font-size: 13px;
  color: #aaa;
}
</style>